package main

import "fmt"

type Examplefunc func(...int) int

func add(args ...int) (sum int) {
	sum = 0
	for _, v := range args {
		sum += v
	}
	return sum
}

func warpadd(s string, handler Examplefunc, args ...int) {
	fmt.Println(s)
	fmt.Println(args)
	fmt.Println("result:", handler(args...))

}

func main() {
	warpadd("Just for testing", add, 1, 2, 3, 4)
	fmt.Println("result:", add(1, 2, 3, 4))
}
